﻿using System;
using System.Collections.Generic;
using SharpSqlAnalyzer.nodes;
using SharpSqlAnalyzer.nodes.hive;
using SharpSqlAnalyzer.nodes.mysql;

namespace SharpSqlAnalyzer.stmt
{
	// Token: 0x02000093 RID: 147
	public class TCreateIndexSqlStatement : TCustomSqlStatement
	{
		// Token: 0x17000078 RID: 120
		// (get) Token: 0x060003FE RID: 1022 RVA: 0x002FA997 File Offset: 0x002F8B97
		// (set) Token: 0x060003FD RID: 1021 RVA: 0x002FA98E File Offset: 0x002F8B8E
		public List<TMySQLIndexOption> IndexOptionList
		{
			get
			{
				return this._indexOptionList;
			}
			set
			{
				this._indexOptionList = value;
			}
		}

		// Token: 0x17000079 RID: 121
		// (get) Token: 0x06000400 RID: 1024 RVA: 0x002FA9A8 File Offset: 0x002F8BA8
		// (set) Token: 0x060003FF RID: 1023 RVA: 0x002FA99F File Offset: 0x002F8B9F
		public virtual TExpression FilterPredicate
		{
			get
			{
				return this.filterPredicate;
			}
			set
			{
				this.filterPredicate = value;
			}
		}

		// Token: 0x1700007A RID: 122
		// (get) Token: 0x06000401 RID: 1025 RVA: 0x002FA9B0 File Offset: 0x002F8BB0
		// (set) Token: 0x06000402 RID: 1026 RVA: 0x002FA9B8 File Offset: 0x002F8BB8
		public virtual TObjectName AsTypeName
		{
			get
			{
				return this.asTypeName;
			}
			set
			{
				this.asTypeName = value;
			}
		}

		// Token: 0x1700007B RID: 123
		// (get) Token: 0x06000403 RID: 1027 RVA: 0x002FA9C1 File Offset: 0x002F8BC1
		public virtual TCreateIndexSqlNode CreateIndexNode
		{
			get
			{
				return this.createIndexNode;
			}
		}

		// Token: 0x1700007C RID: 124
		// (get) Token: 0x06000404 RID: 1028 RVA: 0x002FA9C9 File Offset: 0x002F8BC9
		// (set) Token: 0x06000405 RID: 1029 RVA: 0x002FA9D1 File Offset: 0x002F8BD1
		public virtual bool DeferredRebuildIndex
		{
			get
			{
				return this.deferredRebuildIndex;
			}
			set
			{
				this.deferredRebuildIndex = value;
			}
		}

		// Token: 0x1700007D RID: 125
		// (get) Token: 0x06000406 RID: 1030 RVA: 0x002FA9DA File Offset: 0x002F8BDA
		// (set) Token: 0x06000407 RID: 1031 RVA: 0x002FA9E2 File Offset: 0x002F8BE2
		public virtual THiveIndexProperties IndexProperties
		{
			get
			{
				return this.indexProperties;
			}
			set
			{
				this.indexProperties = value;
			}
		}

		// Token: 0x1700007E RID: 126
		// (get) Token: 0x06000408 RID: 1032 RVA: 0x002FA9EB File Offset: 0x002F8BEB
		// (set) Token: 0x06000409 RID: 1033 RVA: 0x002FA9F3 File Offset: 0x002F8BF3
		public virtual TObjectName IndexComment
		{
			get
			{
				return this.indexComment;
			}
			set
			{
				this.indexComment = value;
			}
		}

		// Token: 0x1700007F RID: 127
		// (get) Token: 0x0600040A RID: 1034 RVA: 0x002FA9FC File Offset: 0x002F8BFC
		// (set) Token: 0x0600040B RID: 1035 RVA: 0x002FAA04 File Offset: 0x002F8C04
		public virtual TObjectName InTableName
		{
			get
			{
				return this.inTableName;
			}
			set
			{
				this.inTableName = value;
			}
		}

		// Token: 0x17000080 RID: 128
		// (get) Token: 0x0600040C RID: 1036 RVA: 0x002FAA0D File Offset: 0x002F8C0D
		// (set) Token: 0x0600040D RID: 1037 RVA: 0x002FAA15 File Offset: 0x002F8C15
		public virtual THiveTableFileFormat TableFileFormat
		{
			get
			{
				return this.tableFileFormat;
			}
			set
			{
				this.tableFileFormat = value;
			}
		}

		// Token: 0x17000081 RID: 129
		// (get) Token: 0x0600040E RID: 1038 RVA: 0x002FAA1E File Offset: 0x002F8C1E
		// (set) Token: 0x0600040F RID: 1039 RVA: 0x002FAA26 File Offset: 0x002F8C26
		public virtual TObjectName TableLocation
		{
			get
			{
				return this.tableLocation;
			}
			set
			{
				this.tableLocation = value;
			}
		}

		// Token: 0x17000082 RID: 130
		// (get) Token: 0x06000410 RID: 1040 RVA: 0x002FAA2F File Offset: 0x002F8C2F
		// (set) Token: 0x06000411 RID: 1041 RVA: 0x002FAA37 File Offset: 0x002F8C37
		public virtual THiveTableProperties TableProperties
		{
			get
			{
				return this.tableProperties;
			}
			set
			{
				this.tableProperties = value;
			}
		}

		// Token: 0x17000083 RID: 131
		// (get) Token: 0x06000412 RID: 1042 RVA: 0x002FAA40 File Offset: 0x002F8C40
		// (set) Token: 0x06000413 RID: 1043 RVA: 0x002FAA48 File Offset: 0x002F8C48
		public virtual THiveRowFormat TableRowFormat
		{
			get
			{
				return this.tableRowFormat;
			}
			set
			{
				this.tableRowFormat = value;
			}
		}

		// Token: 0x17000084 RID: 132
		// (get) Token: 0x06000415 RID: 1045 RVA: 0x002FAA5A File Offset: 0x002F8C5A
		// (set) Token: 0x06000414 RID: 1044 RVA: 0x002FAA51 File Offset: 0x002F8C51
		public virtual TObjectName TableName
		{
			get
			{
				return this.tableName;
			}
			set
			{
				this.tableName = value;
			}
		}

		// Token: 0x17000085 RID: 133
		// (get) Token: 0x06000417 RID: 1047 RVA: 0x002FAA6B File Offset: 0x002F8C6B
		// (set) Token: 0x06000416 RID: 1046 RVA: 0x002FAA62 File Offset: 0x002F8C62
		public virtual TOrderByItemList ColumnNameList
		{
			get
			{
				return this.columnNameList;
			}
			set
			{
				this.columnNameList = value;
			}
		}

		// Token: 0x17000086 RID: 134
		// (get) Token: 0x06000419 RID: 1049 RVA: 0x002FAA7C File Offset: 0x002F8C7C
		// (set) Token: 0x06000418 RID: 1048 RVA: 0x002FAA73 File Offset: 0x002F8C73
		public virtual bool Clustered
		{
			get
			{
				return this.isClustered;
			}
			set
			{
				this.isClustered = value;
			}
		}

		// Token: 0x17000087 RID: 135
		// (get) Token: 0x0600041B RID: 1051 RVA: 0x002FAA8D File Offset: 0x002F8C8D
		// (set) Token: 0x0600041A RID: 1050 RVA: 0x002FAA84 File Offset: 0x002F8C84
		public virtual bool NonClustered
		{
			get
			{
				return this.isNonClustered;
			}
			set
			{
				this.isNonClustered = value;
			}
		}

		// Token: 0x0600041C RID: 1052 RVA: 0x002FAA95 File Offset: 0x002F8C95
		public TCreateIndexSqlStatement(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstcreateindex;
		}

		// Token: 0x0600041D RID: 1053 RVA: 0x002FAAA6 File Offset: 0x002F8CA6
		internal override void buildsql()
		{
		}

		// Token: 0x0600041E RID: 1054 RVA: 0x002FAAA8 File Offset: 0x002F8CA8
		internal override void clear()
		{
		}

		// Token: 0x0600041F RID: 1055 RVA: 0x002FAAAA File Offset: 0x002F8CAA
		internal override string getasprettytext()
		{
			return "";
		}

		// Token: 0x06000420 RID: 1056 RVA: 0x002FAAB1 File Offset: 0x002F8CB1
		internal virtual void iterate(TVisitorAbs pvisitor)
		{
		}

		// Token: 0x06000421 RID: 1057 RVA: 0x002FAAB4 File Offset: 0x002F8CB4
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			this.createIndexNode = (TCreateIndexSqlNode)this.rootNode;
			base.doParseStatement(psql);
			this.indexName = this.createIndexNode.IndexName;
			base.DatabaseObjects.Add(this.indexName);
			this.tableName = this.createIndexNode.TableName;
			this.columnNameList = this.createIndexNode.ColumnNameList;
			this.asTypeName = this.createIndexNode.AsTypeName;
			this.deferredRebuildIndex = this.createIndexNode.DeferredRebuildIndex;
			this.indexProperties = this.createIndexNode.IndexProperties;
			this.inTableName = this.createIndexNode.InTableName;
			if (this.inTableName != null)
			{
				this.inTableName.ObjectType = 3;
			}
			this.tableRowFormat = this.createIndexNode.TableRowFormat;
			this.tableFileFormat = this.createIndexNode.TableFileFormat;
			this.tableLocation = this.createIndexNode.TableLocation;
			this.tableProperties = this.createIndexNode.TableProperties;
			this.indexComment = this.createIndexNode.IndexComment;
			this._indexOptionList = this.createIndexNode.IndexOptionList;
			if (this.createIndexNode.TableName != null)
			{
				this.createIndexNode.TableName.ObjectType = 3;
			}
			this.indexType = this.createIndexNode.IndexType;
			this.isClustered = this.createIndexNode.Clustered;
			this.isNonClustered = this.createIndexNode.NonClustered;
			this.filterPredicate = this.createIndexNode.FilterPredicate;
			if (this.createIndexNode.OptionList != null)
			{
				for (int i = 0; i < this.createIndexNode.OptionList.size(); i++)
				{
					TDummy dummyItem = this.createIndexNode.OptionList.getDummyItem(0);
					switch (dummyItem.int1)
					{
					case 1:
						this._includeColumns = (TObjectNameList)dummyItem.list1;
						break;
					case 3:
						this.filegroupOrPartitionSchemeName = (TObjectName)dummyItem.node1;
						if (dummyItem.list1 != null)
						{
							this._partitionSchemeColumns = (TObjectNameList)dummyItem.list1;
						}
						break;
					}
				}
			}
			return 0;
		}

		// Token: 0x17000088 RID: 136
		// (get) Token: 0x06000423 RID: 1059 RVA: 0x002FACEC File Offset: 0x002F8EEC
		// (set) Token: 0x06000422 RID: 1058 RVA: 0x002FACE3 File Offset: 0x002F8EE3
		public virtual TObjectName FilegroupOrPartitionSchemeName
		{
			get
			{
				return this.filegroupOrPartitionSchemeName;
			}
			set
			{
				this.filegroupOrPartitionSchemeName = value;
			}
		}

		// Token: 0x17000089 RID: 137
		// (get) Token: 0x06000425 RID: 1061 RVA: 0x002FACFD File Offset: 0x002F8EFD
		// (set) Token: 0x06000424 RID: 1060 RVA: 0x002FACF4 File Offset: 0x002F8EF4
		public virtual TObjectNameList PartitionSchemeColumns
		{
			get
			{
				return this._partitionSchemeColumns;
			}
			set
			{
				this._partitionSchemeColumns = value;
			}
		}

		// Token: 0x1700008A RID: 138
		// (get) Token: 0x06000427 RID: 1063 RVA: 0x002FAD0E File Offset: 0x002F8F0E
		// (set) Token: 0x06000426 RID: 1062 RVA: 0x002FAD05 File Offset: 0x002F8F05
		public virtual TObjectNameList includeColumns
		{
			get
			{
				return this._includeColumns;
			}
			set
			{
				this._includeColumns = value;
			}
		}

		// Token: 0x1700008B RID: 139
		// (get) Token: 0x06000429 RID: 1065 RVA: 0x002FAD1F File Offset: 0x002F8F1F
		// (set) Token: 0x06000428 RID: 1064 RVA: 0x002FAD16 File Offset: 0x002F8F16
		public virtual EIndexType IndexType
		{
			get
			{
				return this.indexType;
			}
			set
			{
				this.indexType = value;
			}
		}

		// Token: 0x1700008C RID: 140
		// (get) Token: 0x0600042A RID: 1066 RVA: 0x002FAD27 File Offset: 0x002F8F27
		// (set) Token: 0x0600042B RID: 1067 RVA: 0x002FAD2F File Offset: 0x002F8F2F
		public virtual TObjectName IndexName
		{
			get
			{
				return this.indexName;
			}
			set
			{
				this.indexName = value;
			}
		}

		// Token: 0x0600042C RID: 1068 RVA: 0x002FAD38 File Offset: 0x002F8F38
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x0600042D RID: 1069 RVA: 0x002FAD48 File Offset: 0x002F8F48
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x040010CE RID: 4302
		private List<TMySQLIndexOption> _indexOptionList;

		// Token: 0x040010CF RID: 4303
		private TExpression filterPredicate;

		// Token: 0x040010D0 RID: 4304
		private TObjectName asTypeName;

		// Token: 0x040010D1 RID: 4305
		private bool deferredRebuildIndex;

		// Token: 0x040010D2 RID: 4306
		private THiveIndexProperties indexProperties;

		// Token: 0x040010D3 RID: 4307
		private TObjectName inTableName;

		// Token: 0x040010D4 RID: 4308
		private THiveRowFormat tableRowFormat;

		// Token: 0x040010D5 RID: 4309
		private THiveTableFileFormat tableFileFormat;

		// Token: 0x040010D6 RID: 4310
		private TObjectName tableLocation;

		// Token: 0x040010D7 RID: 4311
		private THiveTableProperties tableProperties;

		// Token: 0x040010D8 RID: 4312
		private TObjectName indexComment;

		// Token: 0x040010D9 RID: 4313
		private bool isClustered;

		// Token: 0x040010DA RID: 4314
		private bool isNonClustered;

		// Token: 0x040010DB RID: 4315
		private TObjectName tableName;

		// Token: 0x040010DC RID: 4316
		private TOrderByItemList columnNameList;

		// Token: 0x040010DD RID: 4317
		private TObjectName filegroupOrPartitionSchemeName;

		// Token: 0x040010DE RID: 4318
		private TObjectNameList _partitionSchemeColumns;

		// Token: 0x040010DF RID: 4319
		private TObjectNameList _includeColumns;

		// Token: 0x040010E0 RID: 4320
		private TObjectName indexName;

		// Token: 0x040010E1 RID: 4321
		private TCreateIndexSqlNode createIndexNode;

		// Token: 0x040010E2 RID: 4322
		private EIndexType indexType;
	}
}
